
#@layoutT('')
#define main()

<table id="maingrid" lay-filter="maingrid"></table>
<script src="/static/libs/layui/layui.all.js"></script>
<script type="text/html" id="barDemo">
   <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
   <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
</script>
<script type="text/html" id="toolbarDemo">
   <div class="layui-btn-container">
      <button id='addBtn_' class="layui-btn layui-btn-normal layui-btn-sm">
         <i class="layui-icon">&#xe608;</i> 新增
      </button>
      <button id='refreshBtn_' class="layui-btn layui-btn-normal layui-btn-sm">
         <i class="layui-icon">&#xe669;</i> 刷新
      </button>
   </div>
</script>
#end

#define js()
<!-- 分页表格 -->
<script>
    gridArgs.title='';
    gridArgs.dataId='id';
    gridArgs.deleteUrl='#(path)/device/group/delete';
    gridArgs.updateUrl='#(path)/device/group/edit/';
    gridArgs.addUrl='#(path)/device/group/add';
    gridArgs.gridDivId ='maingrid';
    initGrid({id : 'maingrid'
        ,elem : '#maingrid'
        ,toolbar:'#toolbarDemo'
        ,cellMinWidth: 100
        ,cols : [ [
				 {title: '主键',field : 'id',width : 35,checkbox : true},
				 {title:'序号',type:'numbers',width:35},
				 {title:'设备分组',field:'name'},
                 {title:'平台',field:'platform_name'},
				 {title:'创建时间',field:'create_time'},
				 {title:'修改时间',field:'update_time'},
				 {title:'用户',field:'user_code'},

            {fixed:'right',width : 180,align : 'left',toolbar : '#barDemo'}
            ] ]
        ,url:"#(path)/device/group/list"
        ,searchForm : 'searchForm'
    });

</script>
#end



